/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.supplychainmana;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.supplychainmana.ContactsUMapper;
public class ContactsU extends BaseAction
{
    @Autowired(required=false)
	private ContactsUMapper mapper;
    /**
    修改信息
    */
    
    public Map contactsU() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person_info=mapper.person_info(params);
        SQLMap person_info_emt=person_info.getExistfirst();
        result.put("person_info", person_info_emt);
        
        
        SQLList<SQLMap> phones_info=mapper.phones_info(params);
        result.put("phones_info", phones_info);
        
        
        SQLList<SQLMap> email_info=mapper.email_info(params);
        result.put("email_info", email_info);
        
        
        SQLList<SQLMap> contact_ifno=mapper.contact_ifno(params);
        result.put("contact_ifno", contact_ifno);
        
        
        SQLList<SQLMap> text_info=mapper.text_info(params);
        result.put("text_info", text_info);
        
        
        SQLList<SQLMap> address_info=mapper.address_info(params);
        SQLMap address_info_emt=address_info.getExistfirst();
        result.put("address_info", address_info_emt);
        
        
        SQLList<SQLMap> clienttype=mapper.clienttype(params);
        result.put("clienttype", clienttype);
        
        
        SQLList<SQLMap> clientsort=mapper.clientsort(params);
        result.put("clientsort", clientsort);
        
        
        SQLList<SQLMap> station_info=mapper.station_info(params);
        result.put("station_info", station_info);
        
        
        SQLList<SQLMap> phone=mapper.phone(params);
        result.put("phone", phone);
        
        
        SQLList<SQLMap> mails=mapper.mails(params);
        result.put("mails", mails);
        
        
        SQLList<SQLMap> ims=mapper.ims(params);
        result.put("ims", ims);
        
        
        SQLList<SQLMap> textmsgs=mapper.textmsgs(params);
        result.put("textmsgs", textmsgs);
        
        
        SQLList<SQLMap> phonetype=mapper.phonetype(params);
        result.put("phonetype", phonetype);
        
        
        SQLList<SQLMap> emailtype=mapper.emailtype(params);
        result.put("emailtype", emailtype);
        
        
        SQLList<SQLMap> text=mapper.text(params);
        result.put("text", text);
        
        
        SQLList<SQLMap> momentcon=mapper.momentcon(params);
        result.put("momentcon", momentcon);
        
        
        SQLList<SQLMap> momentconano=mapper.momentconano(params);
        result.put("momentconano", momentconano);
        
        return result;
    }
    /**
    修改信息修改
    */
    
    public Map contactsUSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int contacts_person = mapper.contacts_person(params);
        result.put("contacts_person", contacts_person);
        
        
        for (SQLMap emt:hqlBean.getTableElements("phones")){
            params=new SQLParam(request,emt.getMap());
            mapper.contacts_phones(params);
        }
        
        
        for (SQLMap emt:hqlBean.getTableElements("email")){
            params=new SQLParam(request,emt.getMap());
            mapper.contacts_email(params);
        }
        
        
        for (SQLMap emt:hqlBean.getTableElements("moment_contact")){
            params=new SQLParam(request,emt.getMap());
            mapper.contacts_moment_contact(params);
        }
        
        
        for (SQLMap emt:hqlBean.getTableElements("text_address")){
            params=new SQLParam(request,emt.getMap());
            mapper.contacts_text_address(params);
        }
        
        
        int contacts_address = mapper.contacts_address(params);
        result.put("contacts_address", contacts_address);
        
        return result;
    }
}